package xmu.zfw.domain;

import lombok.Data;

import java.io.Serializable;

@Data
public class Reporter implements Serializable {
    private Integer id;
    private String name;
    private String location;
    private String phone;
    private String cardId;

    public Boolean compare(Reporter reporter){
        if(name != null && !name.equals(reporter.getName())){
            return false;
        }
        if(location != null && !location.equals(reporter.getLocation())){
            return false;
        }
        if(phone != null && !phone.equals(reporter.getPhone())){
            return false;
        }
        if(cardId != null && !cardId.equals(reporter.getCardId())){
            return false;
        }
        return true;
    }
}
